import axios from 'axios';
export const getListData = data => {
    return {
      type: 'GETLISTS',
      data
    };
  };
  export function fetchList() {
    return dispatch => {
      var url = `http://localhost:3000/people?id=1`;
      // var url = `http://47.110.60.142:8080/zuiying/qunzu`
      // var url = "http://47.105.193.59:8080/zhuiying/getCollections?Uid=1"
      return axios({
        url   : url,
        method: 'get',
        // data  : {Userid:1,Username:'zhansan'}
      }).then(res => {
        dispatch(getListData(res.data));
      });
    };
  };

 